<!DOCTYPE html>
<html class="x-admin-sm">
    <head>
        <meta charset="UTF-8">
        <title>欢迎页面-X-admin2.2</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
        <link rel="stylesheet" href="/static/admin/css/font.css">
        <link rel="stylesheet" href="/static/admin/css/xadmin.css">
        <script src="/static/admin/lib/layui/layui.js" charset="utf-8"></script>
        <script type="text/javascript" src="/static/admin/js/xadmin.js"></script>
    </head>
    <body>
        <div class="layui-fluid">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-body ">
                            <blockquote class="layui-elem-quote">欢迎管理员：
                                <span class="x-red">{$user['username']}</span>！当前时间:<label id="date"></label>
                            </blockquote>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-header">数据统计</div>
                        <div class="layui-card-body ">
                            <ul class="layui-row layui-col-space10 layui-this x-admin-carousel x-admin-backlog">
                                <li class="layui-col-md2 layui-col-xs6">
                                    <a href="javascript:;" class="x-admin-backlog-body">
                                        <h3>文章分类数</h3>
                                        <p><cite>{$nav}</cite></p>
                                    </a>
                                </li>
                                <li class="layui-col-md2 layui-col-xs6 ">
                                    <a href="javascript:;" class="x-admin-backlog-body">
                                        <h3>文章数</h3>
                                        <p><cite>{$art}</cite></p>
                                    </a>
                                </li>
                                <li class="layui-col-md2 layui-col-xs6 ">
                                    <a href="javascript:;" class="x-admin-backlog-body">
                                        <h3>今日阅读数</h3>
                                        <p><cite>{$dayread}</cite></p>
                                    </a>
                                </li>
                                <li class="layui-col-md2 layui-col-xs6 ">
                                    <a href="javascript:;" class="x-admin-backlog-body">
                                        <h3>总阅读数</h3>
                                        <p><cite>{$allread}</cite></p>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-header">系统信息</div>
                        <div class="layui-card-body ">
                            <table class="layui-table">
                                <tbody>
                                    <tr>
                                        <th>操作系统</th>
                                        <td>{$os}</td>
                                    </tr>
                                    <tr>
                                        <th>运行环境</th>
                                        <td>Nginx</td>
                                    </tr>
                                    <tr>
                                        <th>PHP版本</th>
                                        <td>{$php}</td>
                                    </tr>
                                    <tr>
                                        <th>MYSQL版本</th>
                                        <td>{$mysql}</td>
                                    </tr>
                                    <tr>
                                        <th>Swoole</th>
                                        <td>{$swoole}</td>
                                    </tr>
                                    <tr>
                                        <th>EasySwoole</th>
                                        <td>{$easyswoole}</td>
                                    </tr>
                                    <tr>
                                        <th>上传附件限制</th>
                                        <td>3M</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        </div>
        <script>
            currentDate();
            setInterval(function(){
                currentDate();
            }, 1000);
            function currentDate()
            {
                let date = new Date();
                document.getElementById("date").innerHTML =  
                    date.getFullYear() + '-' + 
                    (date.getMonth() + 1).toString().padStart(2, '0') + '-' +
                    (date.getDate()).toString().padStart(2, '0') + ' ' +
                    (date.getHours()).toString().padStart(2, '0') + ':' +
                    (date.getMinutes()).toString().padStart(2, '0') + ':' +
                    (date.getSeconds()).toString().padStart(2, '0')
            }
        </script>
    </body>
</html>